<?php
/**
 * Created by PhpStorm.
 * User: sks
 * Date: 16/4/29
 * Time: 下午4:54
 */
echo "<meta charset='utf8'>";
function getuserinfo(){

    $weixin = new \Org\Weixin;
    $info = session('userinfo');
    if($info){
        print_r($info);
    }else {
        $state = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
        $code = '';
        $url = 'http://' . $_SERVER['HTTP_HOST'] . U('Home/Index/zhanshi');
        $url = urlencode($url);
        $weixin->jingmo($url, $code, $state);
    }
}
function p($arr){
    echo "<meta charset='utf8'>";
    echo "<pre>";
    print_r($arr);
}
